<?php
/**
 * Note: APP资源
 * Date: 2021/7/12
 */
namespace App\Models\Game\Center;

use App\Traits\ModelTrait;

class AppResource extends Base
{
    use ModelTrait;

    public $table = 'app_resources';

    public $fillable = [
        // 'appid',
        'source',
        'os',
        'version',
        'min_version',
        'is_debug',
        'url',
        'bak_url',
        'status',
    ];

    /**
     * 关联 APP
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    // public function app()
    // {
    //     return $this->belongsTo('App\Models\Game\Main\App', 'appid', 'id');
    // }

    /**
     * 关联渠道
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function source()
    {
        return $this->belongsTo('App\Models\Game\Center\AppSource', 'source', 'id');
    }
}
